package com.example.entity;




import org.springframework.stereotype.Component;

import java.util.HashSet;
import java.util.Set;

@Component
public class IpAddressRecorder {

    private Set<String> ipAddressSet = new HashSet<>();

    public void addIpAddress(String ipAddress) {
        ipAddressSet.add(ipAddress);
    }

    public Set<String> getAllIpAddresses() {
        return ipAddressSet;
    }

    public void clear() {
        ipAddressSet.clear();
    }
}
